<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>

<?php
$attributes = array(
    'class' => 'control-label',
);
?>

<div class="span9">

    <h2><?php echo $titulo; ?></h2>

    <?php echo get_message(); ?>

    <?php echo form_open(); ?>
    <div class="control-group">
        <?php echo form_label('Nombre', 'nombre', $attributes); ?>
        <div class="controls">
            <?php
            echo form_input(array('class' => 'span6', 'name' => 'nombre', 'type' => 'text', 'value' => $banco['nombre']));
            ?>
        </div>
    </div>
    <div class="control-group">
        <?php echo form_label('Sucursal', 'sucursal', $attributes); ?>
        <div class="controls">
            <?php echo form_input(array('class' => 'span6', 'name' => 'sucursal', 'type' => 'text', 'value' => $banco['sucursal'])); ?>
        </div>
    </div>
    <div class="control-group">
        <?php echo form_label('Nro de cuenta', 'nroCuenta', $attributes); ?>
        <div class="controls">
            <?php echo form_input(array('class' => 'span6', 'name' => 'nroCuenta', 'type' => 'text', 'value' => $banco['nroCuenta'])); ?>
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            <?php echo form_input(array('class' => 'span6', 'name' => 'submit', 'type' => 'submit', 'value' => 'Guardar', 'class' => 'btn')); ?>
            <button type="button" onclick="window.location = '<?php echo base_url('bancos'); ?>';" class="btn">Cancelar</button>
        </div>
    </div>
    <?php echo form_close(); ?>

</div>

<script type="text/javascript">
    function tipoUsuario(){
        if($('#tipoId').val() == 2) {
            $('#estudioId').show();
        } else {
            $('#estudioId').hide();
        }
    }
    
    $(document).ready(function(){
        tipoUsuario();
        
        $('#tipoId').change(function() {
            tipoUsuario();
        });
    });
    
</script>